<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <!--[if lt IE 9]>
    <script type="text/javascript" src="../../lib/html5shiv.js?rev=@@hash"></script>
    <script type="text/javascript" src="../../lib/respond.min.js?rev=@@hash"></script>
    <![endif]-->
    <link rel="stylesheet" type="text/css" href="../../static/h-ui/css/H-ui.min.css" />
    <link rel="stylesheet" type="text/css" href="../../static/h-ui.admin/css/H-ui.admin.css" />
    <link rel="stylesheet" type="text/css" href="../../lib/Hui-iconfont/1.0.8/iconfont.css" />
    <link rel="stylesheet" type="text/css" href="../../static/h-ui.admin/skin/default/skin.css" id="skin" />
    <link rel="stylesheet" type="text/css" href="../../static/h-ui.admin/css/style.css" />
    <link rel="stylesheet" type="text/css" href="../../ht-css/style-q.css" />
    <link rel="stylesheet" type="text/css" href="../../ht-css/Project.css" />
    <!--企业logo组件-->
    <link rel="stylesheet" type="text/css" href="../../ht-css/contract/ccontract.css" />
    <link rel="stylesheet" type="text/css" href="../../ht-css/contract/jquery.Jcrop.css" />
    <link rel="stylesheet" type="text/css" href="../../ht-css/contract/jquery.Jcrop.min.css" />
    <link rel="stylesheet" href="../../ht-css/replaceAddress/addAddress.css">
    <!--[if IE 6]>
    <script type="text/javascript" src="../../lib/DD_belatedPNG_0.0.8a-min.js" ></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]-->
    <title>授权收货人</title>
    <style type="text/css">
        .canEdit{width:100%;height:25px;border:1px solid #dedede;background:transparent}
        #invoice_info td{padding:5px 20px}
        #Range td{border:1px solid #dedede;}
        td.td2 {width: 12%;}
        td.td3 {width: 80%;}
        .mt-20 {margin-top: 20px;margin-left: 20px;display: inline-block;}
        .fahuoc {  width: 200px;}
        .formControls {position: relative;top: -19px;left: 80px;}
        .guanlian2{
            position: absolute;
            top: 35px;
            width:180px;
            overflow-y:scroll;
            max-height: 150px;
            z-index:1;
            }
    </style>
</head>
<style>
  

</style>
<body data-id="161">
<nav class="breadcrumb">
    <i class="Hui-iconfont">&#xe67f;</i>
    首页 <span class="c-gray en">&gt;</span> 客户管理<span class="c-gray en">&gt;</span> 签约客户信息详情
    <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" >
        <i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<article class="page-container">
    <div id="tab_demo" class="HuiTab">
        <div class="tabBar clearfix ml-20 mr-20">
            <span>基本信息</span>
          <!--  <span>项目信息</span>
            <span>合同信息</span>-->
            <span>客户相关配置</span>
            <span>发票管理</span>
            <span>成本中心管理</span>
            <!--<span>关联额度控制</span>-->
         <!--   <span>账号信息</span>-->
        </div>
        <form class="ml-20 mr-20" id="form-member-add"  method="post">
            <div class="tabCon bk-gray bg-1" style="display: none;">
                <div id="customerdetails_lsit">
                    <script id="customerdetails_bob" type="text/x-dot-template">
                        <div class=" pd-5 bg-1 mt-10">
                            <div class="va-m pl-10 lh-50 f-17 f-16">
                                <strong>客户基本信息</strong>
                            </div>
                            <table class="table-hover table_li ml-10">
                                <thead class="text-l">
                                <tr >
                                    <td class="col-4-1">
                                        <span>客户ID: <span  class="text-overflow" style="width: 10px">{{=it.customer_id}}</span></span>
                                    </td>
                                    <td class="col-4-1">
                        <span>客户等级:
                             {{if( it.customer_grade ==undefined  ){ }}
                                <span></span>
                                {{ }else{ }}
                                </span>{{=it.customer_grade}}</span>
                                        {{ } }}
                                    </td>
                                    <td class="col-4-1">
                                        <span>客户类型: <span class="text-overflow" style="width: 10px">{{=it.customer_type}}</span></span>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="col-4-1">
                                        <span>客户名称: <span>{{=it.customer_name}}</span></span>
                                    </td>
                                    <td class="col-4-1">
                                <span>采购商品简述:
                                     {{if( it.purch_good_introduct ==null ){ }}
                                    <span class="powerButton 243"><a onclick="updatauuu()">修改</a></span>
                                        {{ }else{ }}
                                        </span>{{=it.purch_good_introduct}}</span><a class="powerButton 243" onclick="updatauuu()">修改</a>
                                        {{ } }}
                                    </td>

                                </tr>
                                <tr>
                                    <td class="col-5-2">
                                        <span class="f-l">客户别名：</span>
                                        {{if( it.customer_alias_name ==null ){ }}
                                        <input type="text"  value="" id="name1" maxlength="100"  class="input-text radius w-150 f-l customerAliasName"  style="width:272px;margin-top: 5px;margin-left: 10px;"  readonly/><a class="ml-20 updataBtn customerAliasName1"  onclick="aliasupdata()">修改</a><a style="display: none" class="ml-10 customerAliasName2" onclick="aliasCancel()">取消</a><a class="ml-10 customerAliasName2" style="display: none" onclick="aliasupdataSure(1)">保存</a>
                                        {{ }else{ }}
                                        <input type="text" maxlength="100"  value="{{=it.customer_alias_name}}" id="name2"  class="input-text radius w-150 f-l customerAliasName"  style="width:272px;margin-top: 5px;margin-left: 10px;" readonly /><a class="ml-20 updataBtn customerAliasName1"  onclick="aliasupdata()">修改</a><a class="ml-10 customerAliasName2" style="display: none" onclick="aliasCancel()">取消</a><a class="ml-10 customerAliasName2" style="display: none" onclick="aliasupdataSure(2)">保存</a>
                                        {{ } }}
                                    </td>
                                    <td class="col-5-2">
                                        <span>是否分销公司:
                                        {{if( it.isDistributorOrganization ==null || it.isDistributorOrganization ==""){ }}
                                        <span>否</span>
                                        {{ }else{ }}
                                        {{if( it.isDistributorOrganization ==0 ){ }}
                                         <span>否</span>
                                        {{ }else{ }}
                                        </span>是</span>
                                        {{ } }}
                                        {{ } }}
                                    </td>
                                        <td class="col-5-2">
                                        <span>是否分销商:
                                        {{if( it.is_distributor ==null || it.is_distributor ==""){ }}
                                        <span>否</span>
                                        {{ }else{ }}
                                         {{if( it.is_distributor ==0 ){ }}
                                        <span>否</span>
                                        {{ }else{ }}
                                        </span>是</span>
                                        {{ } }}
                                        {{ } }}
                                    </td>
                                </tr>
                                <tr >
                                    <td  class="col-1-1" colspan="4">
                                        <label class="f-l">客户简介：</label>
                                        <div class="formControls col-xs-8 col-sm-9 mt-10 mb-10" style="top:0">
                                            <textarea name="abstract" class="textarea"  readonly="readonly" title="不可输入">{{=it.introduct}}</textarea>
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="col-4-1">
                                        <span >运营经理: <span>{{=it.operate_manager_name}}</span></span><a class="powerButton 243" onclick="updataii('修改运营经理','see_revise.html','600','300')">修改</a>
                                    </td>

                                    <td class="col-4-1">
                                        <span >销售主管: <span>{{=it.saleManagerName}}</span></span>
                                    </td>
                                    <td class="col-4-1">
                                        <span >联系方式: <span>{{=it.saleManagerPhone}}</span></span>
                                    </td>


                                </tr>

                                <div class="line mt-10"></div>
                                <tr>
                                    <td class="col-4-1">
                                        <span>客户联系人: <span class="text-overflow" style="width: 10px">{{=it.linkman}}</span></span>
                                    </td>

                                    <td class="col-4-1">
                                        <span>手机: <span>{{=it.mobile}}</span></span>
                                    </td>
                                    <td class="col-4-1">
                                        <span>固话: <span>{{=it.office_phone}}</span></span>
                                    </td>

                                </tr>
                                <tr>
                                    <td class="col-4-1">
                                <span>邮箱:
                                     {{if( it.email ==null ){ }}
                                    <span class="powerButton 243"><a onclick="updattt()">修改</a></span>
                                        {{ }else{ }}
                                        </span>{{=it.email}}</span><a class="powerButton 243" onclick="updattt()">修改</a>
                                        {{ } }}
                                    </td>
                                    <td class="col-4-1">
                                <span>授权收货人:
                                     {{if( it.consignee_name ==null ){ }}
                                    <span></span>
                                        {{ }else{ }}
                                        </span>{{=it.consignee_name}}</span>
                                        {{ } }}
                                     </td>
                                   <!-- <td class="col-4-1">
                                        <span> 授权收货人: <span>{{=it.consignee_name}}</span></span>
                                        &lt;!&ndash;<a class="c-blue ml-30" onclick="more_add('授权收货人','../contract/takeover.html','1000','400','310')">查看更多 >></a>&ndash;&gt;
                                    </td>-->
                                    <td class="col-4-1">
                                        <span>办公地址: <span>{{=it.address}}</span></span>
                                    </td>

                                </tr>
                                <tr>
                                    <td class="col-4-1">
                                        <span >客户归属: <span>{{=it.organization_name}}</span></span>
                                    </td>
                                    <td class="col-4-1">
                                        <span>职位: <span>{{=it.duty}}</span></span>
                                    </td>
                                    <td class="col-4-1">
                                <span>注册地址:
                                     {{if( it.register_address ==null ){ }}
                                    <span></span>
                                        {{ }else{ }}
                                        </span>{{=it.register_address}}</span>
                                        {{ } }}
                                    </td>
                                    <input type="hidden" id="customerlimitShip" value="{{=it.is_restrict}}">
                                </tr>
                                </thead>
                            </table>
                            <div class="line mt-10"></div>
                            <div class="cl mt-10">
                                <table class="table-hover table_li ml-10  f-l" style="width: 40%;">
                                    <thead class="">

                                    <tr>
                                        <td width="30">
                                            <span>客户资质:</span>
                                        </td>
                                        <td width="50">
                                            <span>企业营业执照</span>
                                        </td>
                                        <td width="20">
                                            <span></span>
                                        </td>
                                        <td width="50">
                                            <div class="ceshi pic_up">
                                                <img title="" width="50" height="50" src="{{=it.group_business_license_addr}}" class="myImg" class="mr-10">
                                            </div>
                                            <div class="pic_up_btn" style="margin-top: 10px">
                                                <input value="{{=it.group_business_license_addr}}" id="fileUp1" style="display: none">
                                                <input type="file" class="fileUp"  onchange="putDataToPage(event,this)" multiple="multiple" style="display: none">
                                                </input>
                                                <a class="powerButton 243" onclick="addBtn(this,1)" style="margin-left: 20px"><span >上传</span></a>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr >
                                        <td></td>
                                        <td width="50">
                                            <span>企业开户许可证:</span>
                                        </td>
                                        <td width="20">
                                            <span></span>
                                        </td>
                                        <td width="50">
                                            <div class="ceshi pic_up">
                                                <img title="" width="50" height="50" src="{{=it.group_opening_account_addr}}" class="myImg" class="mr-10">
                                            </div>
                                            <div class="pic_up_btn" style="margin-top: 10px">
                                                <input value="{{=it.group_opening_account_addr_short}}" id="fileUp2" style="display: none">
                                                <input type="file" class="fileUp"  onchange="putDataToPage(event,this)" multiple="multiple" style="display: none">
                                                </input>
                                                <a class="powerButton 243" onclick="addBtn(this,2)" style="margin-left: 20px"><span >上传</span></a>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr >
                                        <td></td>
                                        <td width="50">
                                            <span>企业法人身份证:</span>
                                        </td>
                                        <td width="20">
                                            <span></span>
                                        </td>
                                        <td width="50">
                                            <div class="ceshi pic_up">
                                                <img title="" width="50" height="50" src="{{=it.group_IDcard_url}}" class="myImg" class="mr-10">
                                            </div>
                                            <div class="pic_up_btn" style="margin-top: 10px">
                                                <input value="{{=it.group_IDcard_url}}" id="fileUp3" style="display: none">
                                                <input type="file" class="fileUp"  onchange="putDataToPage(event,this)" multiple="multiple" style="display: none">
                                                </input>
                                                <a class="powerButton 243" onclick="addBtn(this,3)" style="margin-left: 20px"><span >上传</span></a>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td></td>
                                        <td width="50">
                                            <span>委托授权书:</span>
                                        </td>
                                        <td width="20">
                                            <span></span>
                                        </td>
                                        <td width="50">
                                            <div class="ceshi pic_up">
                                                <img title="" width="50" height="50" src="{{=it.group_loa}}" class="myImg" class="mr-10">
                                            </div>
                                            <div class="pic_up_btn" style="margin-top: 10px">
                                                <input value="{{=it.group_loa_short}}" id="fileUp4" style="display: none">
                                                <input type="file" class="fileUp"  onchange="putDataToPage(event,this)" multiple="multiple" style="display: none">
                                                </input>
                                                <a class="powerButton 243" onclick="addBtn(this,4)" style="margin-left: 20px"><span >上传</span></a>
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td></td>
                                        <td width="50">
                                            <span>企业logo:</span>
                                        </td>
                                        <td width="20">
                                            <span></span>
                                        </td>
                                        <td width="50">
                                            <div class="ceshi pic_up">
                                                <img title="" width="50" height="50" src="{{=it.logo}}" class="myImg" id="fileUp5url" class="mr-10">
                                            </div>
                                            <div class="pic_up_btn" style="margin-top: 10px">
                                                <input value="{{=it.logo}}"  id="fileUp5" style="display: none">
                                                <a class="powerButton 243" onclick="logodata(1)" style="margin-left: 20px"><span>上传</span></a>
                                            </div>
                                        </td>
                                    </tr>
                                    </thead>
                                </table>
                            </div>

                        </div>


                        <div class=" pd-5 bg-1 bk-gray mt-10">
                            <div class="va-m pl-10 lh-50 f-17 f-16">
                                <strong>客户扩展信息</strong>
                            </div>
                            <table class="table-hover table_li ml-10">
                                <thead class="text-l">
                                <tr>
                                    <td class="col-4-1">
                        <span>客户来源:
                            {{if( it.origin ==null  ){ }}
                            <span></span>
                            {{ }else{ }}
                            </span>{{=it.origin}}</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                    <td class="col-4-1">
                        <span>客户类别:
                            {{if( it.group ==undefined  ){ }}
                            <span></span>
                            {{ }else{ }}
                            </span>{{=it.group}}</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                    <td class="col-4-1">
                        <span>客户等级:
                            {{if( it.customer_grade ==null  ){ }}
                            <span></span>
                            {{ }else{ }}
                            </span>{{=it.customer_grade}}</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                    <td class="col-4-1">
                        <span>质量等级:
                            {{if( it.quality_grade ==null  ){ }}
                            <span></span>
                            {{ }else{ }}
                            </span>{{=it.quality_grade}}</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="col-4-1">
                        <span>客户性质:
                            {{if( it.customer_property ==null  ){ }}
                            <span></span>
                            {{ }else{ }}
                            </span>{{=it.customer_property}}</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                    <td class="col-4-1">
                        <span>是否上市: <span>
                            {{if( it.is_launch ==true ){ }}
                                </span>否</span>
                                        {{ }else{ }}
                                        </span>是</span>
                                        {{ } }}
                                    </td>
                                    <td class="col-4-1">
                        <span>是否央企: <span>
                            {{if( it.is_cent_enterprise ==true ){ }}
                                </span>否</span>
                                        {{ }else{ }}
                                        </span>是</span>
                                        {{ } }}
                                    </td>
                                    <td class="col-4-1">
                                        <span>是否网上招标:</span>
                                        {{if( it.is_bid ==true ){ }}
                                        </span>否</span>
                                        {{ }else{ }}
                                        </span>是</span>
                                        {{ } }}
                                    </td>
                                </tr>
                                <tr>
                                    <td class="col-4-1">
                        <span>是否挂靠: <span>
                            {{if( it.is_affiliated ==true ){ }}
                            </span>否</span>
                                        {{ }else{ }}
                                        </span>是</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                    <td class="col-4-1">
                        <span>挂靠单位:
                            {{if( it.affiliate_company ==null  ){ }}
                            <span></span>
                            {{ }else{ }}
                            </span>{{=it.affiliate_company}}</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                    <td class="col-4-1">
                        <span>附属单位:
                            {{if( it.attach__company ==null  ){ }}
                            <span></span>
                            {{ }else{ }}
                            </span>{{=it.attach__company}}</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                    <td class="col-4-1">
                        <span>合作模式:
                            {{if( it.cooperation_mode ==null  ){ }}
                            <span></span>
                            {{ }else{ }}
                            </span>{{=it.cooperation_mode}}</span>
                                        {{ } }}
                                        </span>
                                    </td >
                                </tr>
                                <tr>
                                    <td class="col-4-1">
                        <span>销售归属:
                            {{if( it.sale_attribution ==null  ){ }}
                            <span></span>
                            {{ }else{ }}
                            </span>{{=it.sale_attribution}}</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                    <td class="col-4-1">
                        <span>所在城市:
                            {{if( it.city ==null  ){ }}
                            <span></span>
                            {{ }else{ }}
                            </span>{{=it.city}}</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                    <td class="col-4-1">
                        <span>所在地区:
                            {{if( it.region ==null  ){ }}
                            <span></span>
                            {{ }else{ }}
                            </span>{{=it.region}}</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                    <td class="col-4-1">
                        <span>关注总监:
                           {{if( it.follow_majordomo ==null ){ }}
                             <span></span>
                            {{ }else{ }}
                            </span>{{=it.follow_majordomo}}</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="col-4-1">
                        <span>是否关联客户: <span>
                            {{if( it.is_relate_customer ==true ){ }}
                            </span>否</span>
                                        {{ }else{ }}
                                        </span>是</span>
                                        {{ } }}
                                    </td>
                                    <td class="col-4-1">
                        <span>开发票依据:
                            {{if( it.invoice_basis ==null  ){ }}
                            <span></span>
                            {{ }else{ }}
                            </span>{{=it.invoice_basis}}</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                    <td class="col-4-1">
                        <span>最后变更时间:
                              {{if( it.modify_time ==null  ){ }}
                                    <span></span>
                                    {{ }else{ }}
                                    </span>{{=it.modify_time}}</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                    <td class="col-4-1">
                        <span>助记码:
                             {{if( it.help_code ==null  ){ }}
                                    <span></span>
                                    {{ }else{ }}
                                    </span>{{=it.help_code}}</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                </tr>
                                <tr >
                                    <td class="col-1-1" colspan="4">
                                        <label class="f-l">变更理由：</label>
                                        <div class="formControls col-xs-8 col-sm-9 mt-10 mb-10">
                                            {{if( it.change_reason ==null  ){ }}
                                            <textarea name="abstract" class="textarea"  readonly="readonly" title="不可输入"></textarea>
                                            {{ }else{ }}
                                            <textarea name="abstract" class="textarea"  readonly="readonly" title="不可输入">{{=it.change_reason}}</textarea>
                                            {{ } }}
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="col-4-1">
                        <span>注册名称:
                             {{if( it.register_name ==null  ){ }}
                                <span></span>
                                {{ }else{ }}
                                </span>{{=it.register_name}}</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                    <td class="col-4-1">
                        <span>法人:
                              {{if( it.flegal_person ==null  ){ }}
                                <span></span>
                                {{ }else{ }}
                                </span>{{=it.flegal_person}}</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                    <td class="col-4-1">
                        <span>注册资金:
                            {{if( it.register_fund ==null  ){ }}
                                <span></span>
                                {{ }else{ }}
                                </span>{{=it.register_fund}}</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                    <td class="col-4-1">
                        <span>注册地址:
                             {{if( it.register_address ==null  ){ }}
                                <span></span>
                                {{ }else{ }}
                                </span>{{=it.register_address}}</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="col-4-1">
                        <span>营业截止期限:
                            {{if( it.business_deadline ==null  ){ }}
                                <span></span>
                                {{ }else{ }}
                                </span>{{=it.business_deadline}}</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                    <td class="col-4-3" colspan="3">
                        <span>年检时间:
                            {{if( it.annual_insp_time ==null  ){ }}
                                <span></span>
                                {{ }else{ }}
                                </span>{{=it.annual_insp_time}}</span>
                                        {{ } }}
                                        </span>
                                    </td>
                                </tr>
                                </thead>
                            </table>
                        </div>
                    </script>
                </div>

                <div class=" pd-5 bg-1 bk-gray mt-10" id="ceyuud" style="display: none">
                    <div class="va-m pl-10 lh-50 f-17 f-16">
                        <strong> 门店收货信息 </strong>
                    </div>
                    <div class="va-m pl-10 lh-50 f-17 f-16">
                        <strong id="receivername"></strong>&nbsp;&nbsp;&nbsp;<strong id="province_name"></strong>
                    </div>
                    <table class="table-hover table_li ml-10">
                        <thead class="text-l">
                        <tr >
                            <td class="" colspan="5">
                                <div class="row ml-10 clearfix">
                                    <label class="form-label f-l" style="padding-top:2px">收货地址：</label>
                                    <div class="formControls col-xs-2 col-sm-6">
                                        <span id="detail_address"></span>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr >
                            <td class="" colspan="5">
                                <div class="row ml-10">
                                    <label class="form-label f-l" style="padding-top:2px">项目名称：</label>
                                    <div class="formControls col-xs-2 col-sm-5">
                                        <span id="add_alias"></span>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr >
                            <td class="" colspan="5">
                                <div class="row ml-10">
                                    <label class="form-label f-l" style="padding-top:2px">固定电话：</label>
                                    <div class="formControls col-xs-2 col-sm-5">
                                        <span id="office_phone"></span>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr >
                            <td class="" colspan="5">
                                <div class="row ml-10">
                                    <label class="form-label f-l" style="padding-top:2px">电子邮箱：</label>
                                    <div class="formControls col-xs-2 col-sm-5">
                                        <span id="dzemail"></span>
                                    </div>
                                </div>
                            </td>
                        </tr>
                        <tr id="Consignee">
                        </tr>
                        </thead>
                    </table>
                    <div class="text-r pr-20">
                        <a class="pl-10 mr-20 powerButton 243" id="invoiceIgnfo" onclick="invoEdit()">编辑</a>
                    </div>
                </div>
                <div id="dizhi" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="ture" style="border-radius: 8px;">
                    <div class="modal-dialog">
                        <div class="modal-content radius" style="height:650px;width:624px;overflow-y: auto;overflow-x: hidden;">
                            <div class="modal-header"  >
                                <h3 class="modal-title"><b class="addressTitle">新增收货地址</b></h3>
                                <a class="close" style="margin-right: 5px;width: 22px;height: 22px;margin-top: 5px" data-dismiss="modal" aria-hidden="true" >×</a>
                            </div>
                            <input type="hidden" class="ship_add_id">
                            <div class="pop_win pop_receiver"  >
                                <div class="info" >
                                    <div class="clearfix">
                                        <label>项目名称：</label><input name="" type="text" placeholder="请输入地址别名" id="addAlias" class="addAlias">
                                    </div>
                                    <div class="clearfix" id="app"  style="padding-top: 0">
                                        <div class="clearfix area">
                                            <label class="f-l" id="ksfkj"><em>*</em>收货区域：</label>
                                            <select class="select " size="1" style="height: 30px;width:90px;" name="brandclass" id="geta" onchange="discountdata(this.value, 2)"><option value="" selected id="shenge"></option></select>
                                            <select class="select radius f-l ml-10" size="1" style="height: 30px;width:90px;" id="getb" onchange="discountdata(this.value, 3)"><option value="" selected id="shi"></option ></select>
                                            <select class="select radius f-l ml-10" size="1" style="height: 30px;width:90px;" id="getc" onchange="discountdata(this.value, 4)"><option value="" selected id="qu"></option></select>
                                            <select class="select radius f-l ml-10" size="1" style="height: 30px;width:90px;" id="getd" ><option value="" selected id="jei"></option></select>
                                        </div>
                                    </div>
                                    <div class="clearfix">
                                        <label><em>*</em>详细地址：</label><input name="" type="text" placeholder="请输入详细地址" id="detailedAddress" class="detailedAddress" onkeyup="this.value=this.value.replace(/^ +| +$/g,'')">
                                        <div class="etip tip_31"></div>
                                    </div>
                                    <br>
                                    <div><span style="color: #aaa;margin-left:40px;">-----------------------------------------------------------------------------------------</span></div>
                                    <br>
                                    <div class="clearfix"><label><em>*</em>收货人：</label>
                                        <input type="text" onkeyup="value=value.replace(/[^\a-zA-Z\u4E00-\u9FA5]/g,'')" onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\a-zA-Z\u4E00-\u9FA5]/g,''))" placeholder="请选择收货人" onclick="myFuntion()" class="input-text radius mr-10" id="linkman" autocomplete="off" name="likname">


                                        <input name="mobilephone" type="text" placeholder="请输入手机号码进行添加" id="mobilephone" maxlength="11" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" class="input-text radius mr-10">

                                        <a  onclick="addlinkman()">添加</a>
                                        <div id="myDiv" style="display:none;"></div>
                                        <ul style="position:relative;top:5px;width:205px;border:1px solid #d8d8d8;" class="relation radius guanlian" id="tudfan">
                                            <li class="pl-10 lh-26"></li>
                                        </ul>
                                       <!-- <span id="a" style="color: #cc0000"></span>-->
                                        <div class="etip tip_32 tip_38"></div>
                                    </div>
                                    <div id="tableid">

                                        <table class="ml-60">
                                            <tbody id="addressList">

                                            </tbody>
                                        </table>
                                    </div>

                                    <br>
                                    <div><span style="color: #aaa;margin-left:40px;">-----------------------------------------------------------------------------------------</span></div>
                                    <div class="clearfix">
                                        <label>固定电话：</label><input name="" type="text" placeholder="请输入固定电话号码" id="landlineCelephone" class="landlineCelephone" >
                                    </div>


                                    <div class="clearfix">
                                        <label><em></em>邮箱地址：</label><input name="" type="text" placeholder="请输入邮箱地址" id="email" class="email" >
                                    </div>

                                </div>
                                <div class="text-c pt-30"><a onclick="preservationarres()" class="btn btn-secondary radius size-L">保存收货地址</a><a onclick="closeodel()" class="btn radius size-L ml-10">取消</a></div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
           <!-- 项目信息-->
            <!--<div class="tabCon bk-gray bg-1 mr-20 ml-20" style="display: none;">
                <div class=" pd-5 bg-1 bk-gray mt-10" id="project_list">
                    <script id="project_bob" type="text/x-dot-template">
                        <div class="va-m pl-10 lh-50 f-17 f-16">
                            <strong>客户项目信息</strong>
                        </div>
                        <div class="mb-10" >
                            {{if( it && it.length>0 ){ }}
                            {{ for(var i=0, catlen=it.length; i< catlen; i++) { }}
                            <div class="va-m pl-10 f-17 f-15 mb-10 mt-10" style="line-height: 1.5">
                                <strong>项目：{{=[i+1]}}</strong>
                                <br>
                                <strong>项目基础信息:</strong>
                            </div>
                            <table class="table-hover table_li ml-10 bk-gray">
                                <thead class="text-l">
                                <tr>
                                    <td class="col-4-1 va-t">
                                        <span>项目名称: <span>{{=it[i].project_name}}</span></span>
                                    </td>
                                    <td class="col-4-1 va-t">
                                        <span>项目地址: <span>{{=it[i].project_address}}</span></span>
                                    </td>
                                    <td class="col-4-1 va-t">
                                        <span>项目类型: <span>{{=it[i].project_type}}</span></span>
                                    </td>
                                    <td class="col-4-1 va-t">
                                        <span>开发商: <span >{{=it[i].developer}}</span></span>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="col-4-1 va-t">
                                        <span>开发商（甲方）: <span>{{=it[i].developer_party_a}}</span></span>
                                    </td>
                                    <td class="col-4-1 va-t">
                                        <span>工程面积: <span>{{=it[i].area}}</span></span>
                                    </td>
                                    <td class="col-4-1 va-t">
                                        <span>工程总造价: <span>{{=it[i].total_cost}}</span></span>
                                    </td>
                                    <td class="col-4-1 va-t">
                                        <span>资金来源: <span>{{=it[i].fund_source}}</span></span>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="col-4-1 va-t">
                                <span>竣工时间: <span>
                                    {{if(it.completion_time=="null"){ }}
                                         </span>{{=it[i].completion_time}}</span>
                                        {{ }else{ }}
                                        </span></span>
                                        {{ } }}
                                    </td>
                                    <td class="col-4-1 va-t">
                                <span>新增时间: <span >
                                     {{if(it.add_time=="null"){ }}
                                       </span>{{=it[i].add_time}}</span>
                                        {{ }else{ }}
                                        </span></span>
                                        {{ } }}
                                    </td>
                                    <td class="col-4-1 va-t">
                                <span>关闭时间: <span>
                                    {{if( it.close_time=="null"){ }}
                                         </span>{{=it[i].close_time}}</span>
                                        {{ }else{ }}
                                        </span></span>
                                        {{ } }}
                                    </td>
                                    <td class="col-4-1 va-t">
                                        <span></span>
                                    </td>
                                </tr>
                                </thead>
                            </table>
                            {{if( it[i].gContractor==undefined){ }}
                            <div style="line-height: 30px; text-align: center; margin-top: 20px;">暂无总包信息</div>
                            {{ }else{ }}
                            <div class="cl mb-20">
                                <div class="va-m pl-10 f-17 f-15 mb-10 mt-10" style="line-height: 1.5">
                                    <strong>总包方信息：</strong>
                                    <a class="f-r mr-20 c-blue f-14" onclick="total('总包方信息','total.html','{{=it[i].gContractor.projectold_id}}','{{= it[i].gContractor.g_contractorold_id}}',1)">查看更多 >> </a>
                                </div>
                                <div class="bk-gray">
                                    <table class="table-hover table_li ml-20">
                                        <thead class="text-l">
                                        <tr>
                                            <td>
                                                <span></span>
                                                <span>总包方名称: <span>{{=it[i].gContractor.g_name}}</span></span>
                                            </td>
                                            <td>
                                                <span>承包面积: <span>{{=it[i].gContractor.area}}</span></span>
                                            </td>
                                            <td>
                                                <span>材料需求: <span>{{=it[i].gContractor.material_require}}</span></span>
                                            </td>
                                            <td>
                                            <span>产品档次: <span >
                                            {{? it[i].product_grade=="0" }}
                                              </span>高</span>
                                                {{?? it[i].product_grade=="1"}}
                                                </span>中</span>
                                                {{??}}
                                                </span>低</span>
                                                {{}}}
                                                </span></span>
                                            </td>
                                        </tr>
                                        </thead>
                                    </table>
                                    <div class="row ml-20 mt-20" style="wdith:80%">
                                        <label class="f-l">总包工程说明：</label>
                                        <div class="formControls col-xs-8 col-sm-9">
                                            <textarea name="abstract" class="textarea" readonly="readonly" title="不可输入" style="height: 50px;">{{=it[i].gContractor.project_explain}}</textarea>
                                        </div>
                                    </div>
                                    <div style="clear:both"></div>
                                    <div class="row ml-20 mt-20" style="wdith:80%">
                                        <label class="f-l">甲方供材料<br>（含品牌）：  </label>
                                        <div class="formControls col-xs-8 col-sm-9">
                                            <textarea name="abstract" class="textarea" readonly="readonly" title="不可输入" style="height: 50px;">{{=it[i].gContractor.mate_sup_party_a}}</textarea>
                                        </div>
                                    </div>
                                    <table class="table-hover table_li ml-20 mt-10">
                                        <thead class="text-l">
                                        <tr>
                                            <td>
                                                <span>开发状态: <span>{{=it[i].gContractor.dev_status}}</span></span>
                                            </td>
                                            <td>
                                            <span>有无分包: <span>
                                            {{if(it[i].is_subpack==1){ }}
                                            </span>有</span>
                                                {{ }else{ }}
                                                <span>无</span>
                                                {{ } }}
                                                </span>
                                            </td>
                                            <td>
                                            <span>关键分包: <span>
                                                {{if(it[i].gContractor.key_subpack==null){ }}
                                            </span></span>
                                                {{ }else{ }}
                                                <span>{{=it[i].gContractor.key_subpack}}</span>
                                                {{ } }}
                                                </span></span>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                            <span>新增时间: <span >
                                                {{if(it[i].gContractor.add_time==null){ }}
                                                </span></span>
                                                {{ }else{ }}
                                                </span>{{=it[i].gContractor.add_time}}</span>
                                                {{ } }}
                                                </span>
                                            </td>
                                            <td>
                                                <span>审核人: <span>{{=it[i].gContractor.auditor}}</span></span>
                                            </td>
                                            <td>
                                                <span>审核时间: <span>{{=it[i].gContractor.audit_time}}</span></span>
                                            </td>
                                        </tr>
                                        </thead>
                                    </table>
                                </div>
                            </div>
                            {{ } }}
                            {{if( it[i].sContractor==undefined){ }}
                            <div style="line-height: 30px; text-align: center">暂无分包信息</div>
                            {{ }else{ }}
                            <div class="cl">
                                <div class="va-m pl-10 f-17 f-15 mb-10 mt-10" style="line-height: 1.5">
                                    <strong>分包方信息：</strong>
                                    <a class="f-r mr-20 c-blue f-14" onclick="total('分包方详情','branch.html','{{= it[i].sContractor.projectold_id}}','{{= it[i].sContractor.s_contractorold_id}}',2)">查看更多 >> </a>
                                </div>
                                <div class="bk-gray">
                                    <table class="table-hover table_li ml-20 mt-10">
                                        <thead class="text-l">
                                        <tr>
                                            <td>
                                                <span>分包方名称: <span>{{=it[i].sContractor.s_name}}</span></span>
                                            </td>
                                            <td>
                                                <span>对应总包名称: <span>{{=it[i].sContractor.g_contractor}}</span></span>
                                            </td>
                                            <td>
                                                <span>分包面积: <span>{{=it[i].sContractor.area}}</span></span>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <span>分包范围: <span >{{=it[i].sContractor.subpack_range}}</span></span>
                                            </td>
                                            <td>
                                                <span>材料需求: <span>{{=it[i].sContractor.material_require}}</span></span>
                                            </td>
                                            <td>
                                        <span>产品档次: <span>
                                            {{? it[i].product_grade=="0" }}
                                                </span>高</span>
                                                {{?? it[i].product_grade=="1"}}
                                                </span>中</span>
                                                {{??}}
                                                </span>低</span>
                                                {{}}}
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                        <span>分包性质: <span>
                                            {{if(it[i].property=="0"){ }}
                                                </span>劳务清包</span>
                                                {{ }else{ }}
                                                <span>包工包料</span>
                                                {{ } }}
                                            </td>
                                            <td>
                                                <span>开发状态: <span>{{=it[i].sContractor.dev_status}}</span></span>
                                            </td>
                                            <td>
                                            <span>新增时间: <span>
                                                {{if(it[i].sContractor.add_time==null){ }}
                                                    </span></span>
                                                {{ }else{ }}
                                                </span>{{=it[i].sContractor.add_time}}</span>
                                                {{ } }}
                                                </span>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <span>审核人: <span >{{=it[i].sContractor.auditor}}</span></span>
                                            </td>
                                            <td>
                                                <span>审核时间: <span>{{=it[i].sContractor.audit_time}}</span></span>
                                            </td>
                                        </tr>
                                        </thead>
                                    </table>
                                </div>
                            </div>
                            {{ } }}
                            {{ } }}
                            {{ }else{ }}
                            <div style="line-height: 50px; text-align: center">暂无项目</div>
                            {{ } }}
                    </script>
                </div>
            </div>-->
           <!-- 合同信息-->
           <!-- <div class="tabCon bk-gray bg-1" style="display: none;">
                <table class="table table-border table-bg table-hover table-sort mt-10" id="datatableq">
                    <thead>
                    <tr class="text-c">
                        <th width="50">序列</th>
                        <th width="50">云采合同编号</th>
                        <th width="50">集团合同编号</th>
                        <th width="100">合同类型</th>
                        <th width="100">生效日期</th>
                        <th width="50">过期日期</th>
                        <th width="50">合同额度</th>
                        <th width="50">信用额度</th>
                        <th width="60">执行赊欠额度</th>
                        <th width="60">合同状态</th>
                        <th width="60">操作</th>
                    </tr>
                    </thead>
                    <tbody class="shun">
                    </tbody>
                </table>
                <div class="mt-40"></div>
            </div>-->
            <!--客户相关配置-->
            <div class="tabCon bk-gray bg-1" style="display: none;">
                <div class=" pd-5 bg-1 bk-gray mt-10" id="customerInfo" hidden>
                    <div class="va-m pl-10 lh-50 f-17 f-16">
                        <strong>客户相关设置</strong>
                    </div>
                    <div class="mb-10 pl-10">
                        <table>
                            <tbody>
                           <tr style="display: none">
                                <td class="w-70 text-r pt-5 pb-5"><span>客户场景：</span></td>
                                <td>
                                    <div class="pl-10">
                                        <input class="checkbox" type="checkbox" id="civil" name="scene" value="10">
                                        <label for="civil" class="mr-10">土建</label>
                                        <input class="checkbox" type="checkbox" id="hydropower" name="scene" value="20">
                                        <label for="hydropower" class="mr-10">水电</label>
                                        <input class="checkbox" type="checkbox" id="firecontrol" name="scene" value="30">
                                        <label for="firecontrol" class="mr-10">消防</label>
                                        <input class="checkbox" type="checkbox" id="Air" name="scene" value="40">
                                        <label for="Air" class="mr-10">空调通风</label>
                                        <input class="checkbox" type="checkbox" id="garden" name="scene" value="50">
                                        <label for="garden" class="mr-10">市政园林</label>
                                        <input class="checkbox" type="checkbox" id="decoration" name="scene" value="60">
                                        <label for="decoration" class="mr-10">装饰装修</label>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td class="w-70 text-r pt-5 pb-5">发货仓：</td>
                                <td>
                                    <span class="pl-10 mr-20" id="warehouseCode22">平行仓</span>
                                    <input type="text" id="warehouseId"  provincecode="0" provincename="平行价格" cangname="平行仓" cangcode="" value="" hidden/>
                                     <a class="mr-20 powerButton 243" id="warehouseIdall" onclick="store_change()">修改</a>
                                    <a class="powerButton 243" onclick="warehouseUpdate('发货仓修改记录',1)">修改记录</a>
                                </td>
                            </tr>
                           <tr>
                               <td class="w-70 text-r pt-5 pb-5">价格省份：</td>
                               <td>
                                   <span class="pl-10 mr-20" id="provinceName"></span>
                               </td>
                           </tr>
                         <!--   <tr>
                                &lt;!&ndash;      <td class="text-r va-t pt-5 pb-5">限制类型：</td>
                                      <td class="cl pt-5">
                                          <span class="pl-10 mr-20 f-l"><span id="limitMoney"></span><br><br><span id="limitShip"></span></span>
                                          <input type="hidden" value="" id="limieId"/>
                                          <input type="hidden" value="" id="limieShipId"/>
                                          <a class="mr-20 powerButton 243" onclick="type_change()">修改</a>
                                          <a class="powerButton 243" onclick="warehouseUpdate('限制类型修改记录',2,'servicerecord_limit.html')">修改记录</a>
                                      </td>&ndash;&gt;
                                <td class="w-70 text-r pt-5 pb-5"><span>支付方式：</span></td>
                                <td>
                                    <div class="pl-10">
                                        <input class="checkbox paymentmethod"  type="checkbox"   name="paymentmethod"  value="1201">
                                        <label  class="mr-10">账期支付</label>
                                        <input class="checkbox paymentmethod"  type="checkbox"    name="paymentmethod" value="1001">
                                        <label  class="mr-10">在线支付</label>
                                        <input class="checkbox paymentmethod"  type="checkbox"    name="paymentmethod" value="1301">
                                        <label  class="mr-10">银行转账</label>
                                        <input class="checkbox paymentmethod"   type="checkbox"   name="paymentmethod" value="1101">
                                        <label  class="mr-10">货到付款</label>
                                    </div>
                                </td>
                            </tr>-->

                            <tr>
                                <td class="text-r va-t pt-5 pb-5">运费设置：</td>
                                <td class="cl pt-5">
                                    <span class="pl-10 mr-20 f-l" id="joinActivsity"></span>
                                    <a class="mr-20 powerButton 243" id="joinActivsityall" onclick="updatafreight()">修改</a>
                                </td>
                            </tr>
                            <tr>
                                <td class="text-r va-t pt-5 pb-5" style="width: 75px;margin-right: 5px;">是否带回单：</td>
                                <td class="cl pt-5 pl-10">
                                    <input type="radio" name="needReceipt" id="needReceipt-yes" onclick="saveCustomerNeedReceipt(1)">是
                                    <input type="radio" name="needReceipt" id="needReceipt-no" onclick="saveCustomerNeedReceipt(0)">否
                                </td>
                            </tr>
                            </tbody>
                        </table>

                    </div>
                     <form id="form-search1">
                        <div id="company" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="ture" style="border-radius: 8px;top:-40%;">
                            <div class="modal-dialog" style="top:50%;margin-top:-225px">
                                <div class="modal-content radius" style="height:450px;width:600px;">
                                    <div class="modal-header"  >
                                        <h3 class="modal-title text-c"><b class="addressTitle">修改服务仓</b></h3>
                                        <a class="close" style="margin-right: 5px;width: 22px;height: 22px;margin-top: 5px" data-dismiss="modal" aria-hidden="true" >×</a>
                                    </div>

                                    <div class="mt-20" id="allDcCityName">

                                    </div>
                                    <div class="mt-20">
                                        <span class="c-red mr-5 ml-30 va-t">*</span>
                                        <span class="va-t">备注说明：</span>
                                        <textarea onkeydown="checkMaxInput(this,100)"
                                                  onkeyup="checkMaxInput(this,100)" onfocus="checkMaxInput(this,100)" onblur="checkMaxInput(this,100);resetMaxmsg()" class="pd-10" cols="50" rows="10" id="dcTextArea" style="resize:none;border-color:#e4e6e8"></textarea>
                                    </div>
                                    <div class="text-c" style="padding-top: 50px">
                                        <a onclick="close_model(5)" class="btn radius size-S mr-10">取消</a>
                                        <a onclick="save_edit1(5)" class="btn btn-secondary radius size-S">确定</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                    <!-- 主价格省份 -->
                    <div id="pricitybox" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="ture" style="border-radius: 8px;">
                        <div class="modal-dialog" style="top:50%;margin-top:-225px">
                            <div class="modal-content radius" style="height:550px;width:660px;">
                                <div class="modal-header"  >
                                    <h3 class="modal-title text-c"><b class="addressTitle">修改价格省份</b></h3>
                                    <a class="close" style="margin-right: 5px;width: 22px;height: 22px;margin-top: 5px" data-dismiss="modal" aria-hidden="true" >×</a>
                                </div>
                       
                           
                                <div class="mt-20">
                                    <label><span class="c-red mr-5 va-t">*</span>发货仓：</label>
                                    <select class="fahuoc" code="" name="平行仓" id="deliverywarehouseul" onchange="wherehouseChange()">
                           
                                    </select>
                                </div>

                                <div style="margin: 10px 0 0 20px;" >
                                    <label class="va-t"> <span class="c-red mr-5 va-t">*</span>价格省份 ：</label> 
                                            <div class="formControls linkagebox">
                                            <!-- <input type="text"  class="input-text radius" placeholder="请选指定价格省份" id="fen_lsit22" onkeyup="seachprovicnsfn(this)" style="width: 182px" autocomplete="off"> -->
                                            <div  class="input-text radius" placeholder="请选指定价格省份" id="fen_lsit22" onkeyup="seachprovicnsfn(this)" style="width: 182px;padding: 0px" autocomplete="off"></div>
                                            <ul class="relation radius guanlian2 hide" id="getArea" style="margin-top: -9px;">
                                            
                                            </ul>
                                            </div>
                                            <div class="formControls nolinkagebox hide"></div>
                                 
                                </div>
                                <div class="mt-20">
                                    <span class="c-red mr-5 va-t">*</span>
                                    <span class="va-t">备注说明：</span>
                                    <textarea onkeydown="checkMaxInput(this,100)"
                                              onkeyup="checkMaxInput(this,100)" onfocus="checkMaxInput(this,100)" onblur="checkMaxInput(this,100);resetMaxmsg()" class="pd-10" cols="50" rows="10" id="dcTextArea5" style="resize:none;border-color:#e4e6e8"></textarea>
                                </div>
                                <div class="text-c" style="padding-top: 50px">
                                    <a onclick="close_model(1)" class="btn radius size-S mr-10">取消</a>
                                    <a onclick="save_edit1(1)" class="btn btn-secondary radius size-S">确定</a>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- 价格城市 -->

                    <form id="form-search">
                        <div id="company1" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="ture" style="border-radius: 8px;">
                            <div class="modal-dialog" style="top:50%;margin-top:-225px">
                                <div class="modal-content radius" style="height:450px;width:600px;">
                                    <div class="modal-header"  >
                                        <h3 class="modal-title text-c"><b class="addressTitle">修改限制类型</b></h3>
                                        <a class="close" style="margin-right: 5px;width: 22px;height: 22px;margin-top: 5px" data-dismiss="modal" aria-hidden="true" >×</a>
                                    </div>
                                    <!-- <input type="hidden" class="ship_add_id">-->
                                    <div class="mt-20">
                                        <input class="ml-30 radio" type="radio" id="nolimit" name="cashonDelivery" value="10" checked>
                                        <label for="nolimit" class="mr-30">不限制货到付款</label>
                                        <input class="radio" type="radio" id="limit" name="cashonDelivery" value="20">
                                        <label for="limit">限制货到付款</label>
                                    </div>
                                    <div class="mt-20">
                                        <span class="c-red mr-5 ml-30 va-t">*</span>
                                        <span class="va-t">备注说明：</span>
                                        <textarea class="pd-10" onkeydown="checkMaxInput(this,100)"
                                                  onkeyup="checkMaxInput(this,100)" onfocus="checkMaxInput(this,100)" onblur="checkMaxInput(this,100);resetMaxmsg()" cols="45" id="limitText" rows="10" style="resize:none;border-color:#e4e6e8"></textarea>
                                    </div>
                                    <div class="text-c" style="padding-top: 50px">
                                        <a onclick="close_model(2)" class="btn radius size-S mr-10">取消</a>
                                        <a onclick="save_edit1(2)" class="btn btn-secondary radius size-S">确定</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>

                    <form id="form-search3">
                        <div id="phos1" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="ture" style="border-radius: 8px;">
                            <div class="modal-dialog" style="top:50%;margin-top:-225px">
                                <div class="modal-content radius" style="height:450px;width:600px;">
                                    <div class="modal-header"  >
                                        <h3 class="modal-title text-c"><b class="addressTitle">修改价格类型</b></h3>
                                        <a class="close" style="margin-right: 5px;width: 22px;height: 22px;margin-top: 5px" data-dismiss="modal" aria-hidden="true" >×</a>
                                    </div>
                                    <!-- <input type="hidden" class="ship_add_id">-->
                                    <div class="mt-20">
                                        <input class="ml-30 radio pricetypes1" type="radio" id="limit2" name="priceTypeidivery" value="20" checked>
                                        <label for="limit" class="pricetypes1">批发价</label>
                                        <input class="radio pricetypes2" style="margin-left: 22px;" type="radio" id="nolimit1" name="priceTypeidivery" value="10" >
                                        <label for="nolimit" class="mr-30 pricetypes2">售价</label>
                                        <input class="radio ml-30 pricetypes3" type="radio" id="nolimit3" name="priceTypeidivery" value="30" >
                                        <label for="nolimit" class="mr-30 pricetypes3">分销批发价</label>
                                        <input class="radio" type="radio" id="nolimit4" name="priceTypeidivery" value="40" >
                                        <label for="nolimit" class="mr-30">成本价</label>

                                    </div>
                                    <div class="mt-20">
                                        <span class="c-red mr-5 ml-30 va-t">*</span>
                                        <span class="va-t">备注说明：</span>
                                        <textarea class="pd-10" onkeydown="checkMaxInput(this,100)"
                                                  onkeyup="checkMaxInput(this,100)" onfocus="checkMaxInput(this,100)" onblur="checkMaxInput(this,100);resetMaxmsg()" cols="45" id="pachText" rows="10" style="resize:none;border-color:#e4e6e8"></textarea>
                                    </div>
                                    <div class="text-c" style="padding: 50px">
                                        <a onclick="close_model(3)" class="btn radius size-S mr-10">取消</a>
                                        <a onclick="save_edit1(3)" class="btn btn-secondary radius size-S">确定</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>

                    <!--是否参加活动-->
                    <form id="form-join-activity">
                        <div id="join-activity" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="ture" style="border-radius: 8px;">
                            <div class="modal-dialog" style="top:50%;margin-top:-225px">
                                <div class="modal-content radius" style="height:250px;width:600px;">

                                    <div class="modal-header"  >
                                        <h3 class="modal-title text-c"><b class="addressTitleActivity">是否可以参加活动</b></h3>
                                        <a class="close" style="margin-right: 5px;width: 22px;height: 22px;margin-top: 5px" data-dismiss="modal" aria-hidden="true" >×</a>
                                    </div>
                                    <div class="mt-20" style="margin-left: 182px;">
                                        <span class="va-t">参加活动：</span>
                                        <select onchange="changeActivityStatus()" id="selectActivity" style="width: 162px;">
                                            <option id="noSelect">--请选择--</option>
                                            <option id="join" value="10">可以参加</option>
                                            <option id="noJoin" value="20">不可参加</option>
                                        </select>
                                    </div>

                                    <div class="text-c" style="padding-top: 83px">
                                        <a onclick="close_model(4)" class="btn radius size-S mr-10">取消</a>
                                        <a onclick="save_edit1(4)" class="btn btn-secondary radius size-S">确定</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>

                    <!--  修改运费-->
                    <form id="form-search6">
                        <div id="updatafreight" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="ture" style="border-radius: 8px;top:-40%;">
                            <div class="modal-dialog" style="top:50%;margin-top:-225px">
                                <div class="modal-content radius" style="min-height:512px;width:856px;">
                                    <div class="modal-header"  >
                                        <h3 class="modal-title text-c"><b class="addressTitle">修改运费</b></h3>
                                        <a class="close" style="margin-right: 5px;width: 22px;height: 22px;margin-top: 5px" data-dismiss="modal" aria-hidden="true" >×</a>
                                    </div>
                                    <!-- <input type="hidden" class="ship_add_id">-->

                                    <div class="mt-20">
                                        <label style="margin-left: 43px;">运费规则：</label>
                                        <input class="ml-30 radio" type="radio" id="nolimsit" name="Freightrules" onclick="freightshow(10)" value="10" checked>
                                        <label for="nolimit" class="mr-30">收取运费</label>
                                        <input class="radio" type="radio" id="limsit" name="Freightrules" value="20" onclick="freightshow(20)">
                                        <label for="limit">免运费</label>
                                        <input class="ml-30 radio" type="radio" id="limsits" name="Freightrules" value="30" onclick="freightshow(30)">
                                        <label for="limit">阶梯运费</label>
                                        <input class="ml-30 radio" type="radio" disabled id="limsitss" name="Freightrules" value="40" onclick="freightshow(10)">
                                        <label for="limit">平台免运费政策</label>
                                    </div>
                                    <div  style="display: none" id="zhanshi">
                                        <div class="mt-20">
                                            <label style="margin-left: 43px;">配送方式：</label>
                                            <input class="ml-30 checkbox" type="checkbox" id="deliveryWay-all" name="deliveryWay-all" value="10">
                                            <label for="deliveryWay-all" class="mr-30">全选</label>
                                            <input class="ml-30 checkbox" type="checkbox" id="nolimsist" name="deliveryWay" value="10" >
                                            <label for="nolimit" class="mr-30">鑫方盛物流</label>
                                            <input style="margin-left: -12px;" class=" checkbox" type="checkbox" id="limssit" name="deliveryWay" value="20">
                                            <label for="limit">快递</label>
                                            <input class="ml-30 checkbox" type="checkbox" id="limsssit" name="deliveryWay" value="30">
                                            <label for="limit">快运</label>
                                            <input class="ml-30 checkbox" type="checkbox" id="limssssit" name="deliveryWay" value="40">
                                            <label for="limit">专车包车</label>
                                        </div>
                                        <div class="mt-20">
                                            <label style="margin-left: 67px;">范围：</label>
                                            <input class="ml-30 checkbox" onclick="stoprop()"  type="checkbox" id="nolimsidst" name="cashonDelsivery">
                                            <label for="nolimit" class="mr-30">全选</label>
                                        </div>
                                        <div class="mt-20">
                                            <div  style="overflow-y: auto;max-height: 155px;">
                                                <table class="table table-border table-bg table-hover table-sort" id="tables">
                                                    <tbody id="Range">

                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                    </div>
                                    <div  style="display: none" id="freight_by_ladder">

                                        <div class="mt-20">
                                            <label style="margin-left: 43px;">阶梯设置：</label>

                                            <div class="mt-20">
                                                <label style="margin-left: 43px;"><span class="c-red ">*</span>使用阶梯运费门槛（元）：</label>
                                                <input class="input-text radius" style="width: 98px;" maxlength="9" type="text" id="thresholdFreight" value="0" oninput = "value=value.replace(/[^\d]/g,'')">
                                            </div>

                                            <table class="table table-border table-bordered table-hover table-bg table-sort mt-10" id="dataltable">
                                                <thead>
                                                <tr >
                                                    <th>层级</th>
                                                    <th>订单商品金额（元）</th>
                                                    <th>运费（元）</th>
                                                    <th>操作</th>
                                                </tr>
                                                </thead>
                                                <tbody class="freight_by_ladders">
                                                </tbody>
                                            </table>
                                        </div>
                                        <div class="mt-20">
                                            <a onclick="add_freight_by_ladder()" style="margin-left: 5px;" class="btn radius size-S mr-10">添加层级</a>
                                        </div>
                                    </div>
                                    <div class="text-c" style="padding: 50px 0">
                                        <a onclick="close_updatafreight()" class="btn radius size-S mr-10">取消</a>
                                        <a onclick="Freightadd()" class="btn btn-secondary radius size-S">确定</a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <!--发票管理-->
            <div class="tabCon bk-gray bg-1" style="display: none;">
                <div class="mb-10 pl-10">
                    <table>
                        <tbody>
                        <tr>
                            <td style="width: 103px;float: left;" class="w-75 text-r pt-5 pb-5" >增值税专用发票:</td>

                        </tr>
                        </tbody>
                    </table>
                    <table class="table table-border table-bordered table-hover w-980" >
                        <tbody id="specialinvoice">

                        </tbody>
                    </table>
                    <table>
                        <tbody>
                        <tr>
                            <td style="width: 103px;float: left;" class="w-75 text-r pt-5 pb-5" >普通发票:</td>

                        </tr>
                        </tbody>
                    </table>
                    <table class="table table-border table-bordered table-hover w-980" >
                        <tbody id="ordinaryinvoice">

                        </tbody>
                    </table>
                </div>
            </div>
            <!--成本中心管理-->
            <div class="tabCon bk-gray bg-1 pl-20 pr-20" style="display: none;background: transparent;">
                <div class="pd-5 bg-1 bk-gray mt-10" style="background: #fff;">
                    <div class="mb-10 pl-10 purchase-limit">
                        <div class="mt-20">
                            <label><span class="c-red pr-5">*</span>采购限额类型：</label>
                            <input class="ml-10" type="radio" name="purchaseLimitRadio" value="1">
                            <label>单笔采购限额</label>
                            <input class="ml-20" type="radio" name="purchaseLimitRadio" value="0" >
                            <label class="mr-30">不限</label>
                        </div>
                        <div class="mt-20">
                            <label class="pricetypes1"><span class="c-red pr-5">*</span>采购限额：</label>
                            <input class="purchaseLimitInp input-text radius" style="width: 120px;" maxlength="10" type="text" value="" oninput = "value=value.replace(/[^\d.]/g,'')" onblur="value=mathFloor(value, 2)"> 元
                        </div>
                        <div class="text-c" style="padding-top: 50px">
                            <a onclick="purchaseLimitFn()" class="btn btn-secondary radius size-S">确定</a>
                        </div>
                    </div>
                </div>
            </div>
<!--            <div class="tabCon bk-gray bg-1 ml-20 mr-20" style="display: none;">
                <div class="mt-20 pl-20 f-18"><strong>账号池</strong></div>
                <table class="table table-border table-bordered  table-bg table-sort mt-10 re-list3-nav" id="zhcdatatable">
                    <thead class="text-c">
                    <tr>
                        <th>账号</th>
                        <th>认证手机</th>
                        <th>状态 </th>
                        <th>创建时间 </th>
                        <th>创建人</th>
                    </tr>
                    <tr style="background-color: #FFF1E3; " id="accountTr">
                        <td  colspan="6">
                            <form  id="zomg-add"  method="post">
                                <input type="text"   name="loginAccount"  style="width: 177px;height: 36px;font-size: 16px;float: left;border-radius:14px;border:2px solid #000;"  placeholder="请输入账号" onkeyup="value=value.replace(/[^\w\.\/]/ig,'')"type="text" onkeydown="if(event.keyCode==13){event.keyCode=0;event.returnValue=false;}">

        </form>
    </div>-->
            <div class="modal-dialog" id="modal-company" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="display: none;position: absolute;top: 0%;width:100%;height:105%;background: rgba(0, 0, 0, 0.33);z-index: 10;" >
                <div class="modal-dialog_lsit" style="width:880px;margin-left: 231px;margin-top: 230px;">
            <div class="modal-content radius">
                <div class="modal-header">
                    <h3 class="modal-title">企业logo编辑</h3>
                    <a onclick="logodata(2)" class="close" data-dismiss="modal" aria-hidden="true" href="javascript:;">×</a>
                </div>
                <div class="modal-body modal-center">
                    <div class="main">
                        <div class="mainLeft" align="center">
                            <span>要求：请使用真实企业图片，图片格式支持JPG,JPEG,GIF,PNG，支持5M 以内的图片</span>
                            <div class="background" >
                                <form name="form" id="uploadImgForm" class="form-horizontal" method="post" enctype="multipart/form-data">
                                    <div class="modal-body text-center">
                                        <div class="zxx_main_con">
                                            <div class="zxx_test_list">
                                                <a href="javascript:;" class="file" style="background-color: #4A90E2; border-color: #4A90E2;color: #fff;margin-right: -37px;cursor:pointer;"><input  style="cursor:pointer;" class="photo-file" type="file" name="file" id="fcupload" onchange="readURL(this);" />选择图片</a>
                                                <input type="hidden" name="isNeetCut" value="10">
                                                <img id = "faceId" src="${pageContext.request.contextPath}/static/img/1.jpg" class="jcrop-preview" width="500">
                                                <!-- 图片长宽高隐藏域 -->
                                                <input type="hidden" id="x" name="x" />
                                                <input type="hidden" id="y" name="y" />
                                                <input type="hidden" id="w" name="w" />
                                                <input type="hidden" id="h" name="h" />
                                                <input type="hidden" id="boundx" name="boundx" >
                                                <input type="hidden" id="boundy" name="boundy" >
                                            </div>
                                        </div>
                                    </div>

                                </form>
                            </div>
                        </div>
                        <div class="mainRight" align="center">
                            <span class="effect" style="margin-right: -32px;">效果预览</span><br>
                            <span class="px" style="margin-right: -32px;">100*100像素</span>
                            <div class="background"  style="margin-right: 100px;" >
                                <div id = "preview_box">
                                    <img id = "lookId" src="../../img/adminImg.png" class="jcrop-preview">
                                </div>

                            </div>
                            <input type="button" id="save"  value="确定上传" style="background-color: #4A90E2; border-color: #4A90E2;color: #fff;margin-right: -37px;cursor:pointer;" class="selectPic">

                        </div>
                        <div style="clear:both"></div>
                    </div>
                </div>

            </div>
        </div>
    </div>
</article>

<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="../../lib/jquery/1.9.1/jquery.min.js?rev=@@hash"></script>
<script type="text/javascript" src="../../lib/layer/2.4/layer.js?rev=@@hash"></script>
<script type="text/javascript" src="../../static/h-ui/js/H-ui.min.js?rev=@@hash"></script>
<script type="text/javascript" src="../../static/h-ui.admin/js/H-ui.admin.js?rev=@@hash"></script> <!--/_footer 作为公共模版分离出去-->
<!--引入分页-->
<link rel="stylesheet" href="../../lib/pagination/pagination.css">
<script src="../../lib/pagination/jquery.pagination.js?rev=@@hash"></script>
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="../../lib/My97DatePicker/4.8/WdatePicker.js?rev=@@hash"></script>
<script type="text/javascript" src="../../lib/datatables/1.10.0/jquery.dataTables.min.js?rev=@@hash"></script>
<script type="text/javascript" src="../../lib/laypage/1.2/laypage.js?rev=@@hash"></script>
<script src="../../ht-js/frame/doT.min.js?rev=@@hash"></script>
<script src="../../ht-js/public.js?rev=@@hash"></script>
<!--验证token-->
<script src="../../ht-js/verifyToken.js?rev=@@hash"></script>
<!--企业logo组件-->
<script src="../../ht-js/contract/jquery-form.js?rev=@@hash"></script>
<script src="../../ht-js/contract/jquery.Jcrop.js?rev=@@hash"></script>
<!--log-->
<script src="../../ht-js/frame/doT.min.js?rev=@@hash"></script>
<script src="../../ht-js/Customer/Customer.js?rev=@@hash"></script>
<script src="../../ht-js/Customer/tomer_see.js?rev=@@hash"></script>
<script src="../../ht-js/Customer/purchaseLimit.js?rev=@@hash"></script>
<script src="../../ht-js/contract/oods_pool.js?rev=@@hash"></script>
<script type="text/javascript" src="../../ht-js/address.demo.js"></script>
<!--权限控制-->
<script type="text/javascript" src="../../ht-js/power.js?rev=@@hash"></script>
<script type="text/javascript">
    $('.address_test').address({param: 'address'});
    //职位 授权收货人和di 客户类别
    /*授权收货人*/
    function more_add(title,url,w,h){
        layer_show(title,url,w,h);
    }
    /*总包方详情*/
    function total(title,url,belongProjectId,contractorId,type) {
        var id =getQueryString('id');
        /* alert(belongProjectId)
         alert(contractorId)
         alert(type)*/
        var index = layer.open({
            type: 2,
            content: url+'?customerCode='+id+'&belongProjectId='+belongProjectId+'&contractorId='+contractorId+'&type='+type,
            title: title,
        });
        layer.full(index);

    }
    /*分包方详情*/
    function branch(title,url){
        var index = layer.open({
            type: 2,
            title: title,
            content: url
        });
        layer.full(index);
    }
    web.Customerdetails()

    /*弹窗*/

    function  store_change() {  //修改发货仓 先将所有的发货仓回显成单选框
        var cityHouse = document.getElementById("allDcCityName");
        $(cityHouse).html('');
        $.ajax({
            url: 'https://'+ window.location.host +'/api/admin/abaseservice/area/getAllWarehouse',
            //url: 'https://'+ window.location.host +'/api/admin/alogistics',
            cache: false, //禁用缓存
            type: "POST",
            dataType:"json",
            data:{},
            success: function(obj){
                if (obj.errorCode == 0){
                    var warehouseId = $("#warehouseId").val();
                    var cityAll = "";
                    if(warehouseId == 0 ){
                        cityAll ='<input  class="ml-30 radio" type="radio" checked="checked" id="平行仓" name="cityDC" value=""/><label for="allCity" class="mr-20">平行仓</label>'
                    }else {
                        cityAll ='<input  class="ml-30 radio" type="radio" id="平行仓" name="cityDC" value=""/><label for="allCity" class="mr-20">平行仓</label>'
                    }
                    $(cityHouse).append(cityAll);
                    for (var i = 0;i< obj.data.length;i++){
                        var data = obj.data[i];
                        if(data.warehouse_data_type !=2){
                            if(warehouseId == data.warehouse_code){
                            $(cityHouse).append('<input class="radio" type="radio" id="'+data.warehouse_name+'" checked="checked" name="cityDC" value="'+data.warehouse_code+'"/><label for="allCity" class="mr-20">'+data.warehouse_name+'</label>');
                        }else{
                            $(cityHouse).append('<input class="radio" type="radio" id="'+data.warehouse_name+'" name="cityDC" value="'+data.warehouse_code+'"/><label for="allCity" class="mr-20">'+data.warehouse_name+'</label>');
                        }
                        }
                    }
                } else{
                    layer.msg(obj.errorMessage, {icon: 5,time:2000});
                }
            },
            error: function (XMLHttpRequest, textStatus, errorThrown) {
                alert(XMLHttpRequest);
            }
        });
        $("#company").modal("show");
        $(".addressTitle").html("修改服务仓");
    }
//价格城市修改
function scity_change(){
    $("#pricitybox").modal("show");
    if($("#warehouseId").attr('provincecode')){
    $("#fen_lsit22").html($("#warehouseId").attr('provincename'))
    $("#fen_lsit22").attr('porvincode',$("#warehouseId").attr('provincecode'))
    $("#fen_lsit22").attr('porvinname',$("#warehouseId").attr('provincename'))
    $(".linkagebox").removeClass('hide')
    $(".guanlian2").removeClass('hide')
    $(".nolinkagebox").addClass('hide') 
    deliverywarehouseulfn();
    }else{
        $(".guanlian2").addClass('hide')
        $(".linkagebox").removeClass('hide')  
        $(".nolinkagebox").addClass('hide') 
    } 
}
    function type_change() {
        var limitId = $("#limieId").val();
        if(limitId == ""){
            $("input[type='radio'][name='cashonDelivery']").get(0).checked = true

        }else {
            if (limitId == 10) {
                $("input[type='radio'][name='cashonDelivery']").get(0).checked = true
            } else {
                $("input[type='radio'][name='cashonDelivery']").get(1).checked = true
            }
        }
        $("#company1").modal("show");
        $(".addressTitle").html("修改限制类型");
    }
    function type_priceType() {
        var priceTypeid = $("#priceType").text();
        if(priceTypeid == ""){
            if(sessionStorage.getItem("customertype")=='商店'){
                $(".pricetypes1").css({
                    display: 'none'
                })
                $(".pricetypes2").css({
                    display: 'none'
                })
                $(".pricetypes3").css({
                    display: 'inline-block'
                })
                $("input[type='radio'][name='priceTypeidivery']").get(2).checked = true
            }else {
                $(".pricetypes1").css({
                    display: 'inline-block'
                })
                $(".pricetypes2").css({
                    display: 'inline-block'
                })
                $(".pricetypes3").css({
                    display: 'none'
                })
                $("input[type='radio'][name='priceTypeidivery']").get(0).checked = true
            }

        }else {
            if(sessionStorage.getItem("customertype")=='商店'){
                $(".pricetypes1").css({
                    display: 'none'
                })
                $(".pricetypes2").css({
                    display: 'none'
                })
                $(".pricetypes3").css({
                    display: 'inline-block'
                })
                if (priceTypeid == '分销批发价') {

                    $("input[type='radio'][name='priceTypeidivery']").get(2).checked = true
                } else {

                    $("input[type='radio'][name='priceTypeidivery']").get(3).checked = true
                }
            }else {
                $(".pricetypes1").css({
                    display: 'inline-block'
                })
                $(".pricetypes2").css({
                    display: 'inline-block'
                })
                $(".pricetypes3").css({
                    display: 'none'
                })
                if (priceTypeid == '售价') {

                    $("input[type='radio'][name='priceTypeidivery']").get(1).checked = true
                } else if (priceTypeid == '批发价'){

                    $("input[type='radio'][name='priceTypeidivery']").get(0).checked = true
                }else if (priceTypeid == '成本价'){

                    $("input[type='radio'][name='priceTypeidivery']").get(3).checked = true
                }
            }


        }
        $("#phos1").modal("show");
        $(".addressTitle").html("修改价格类型");
    }

    function activity_change() {
        var joinActivityCode = $("#joinActivityCode").val();
        if(joinActivityCode == ""){
            $("#noSelect").attr("selected",true);

        }else {
            if (joinActivityCode == 10) {
                $("#join").attr("selected",true);
            } else {
                $("#noJoin").attr("selected",true);
            }
        }
        $("#join-activity").modal("show");
        $(".addressTitleActivity").html("修改参加活动类型");
    }

    function invoicEdit() {
        $("#invoiceInfo").hide();
        $("#invoiceSave").show();
        /* $(".canEdit").attr("contenteditable","true");*/
        $("#invoice_info .canEdit").removeAttr("disabled");
        $("#invoice_info .canEdit")[0].focus();
    }


    setTimeout(function () {
        $("#customerInfo").show();
        getCustomerSetting();
    },1.5 * 1000)

    setTimeout( function(){

        var limitship = $("#customerlimitShip").val();
        if (limitship == 1){
            $("#limitShip").text('是限制发货')
        } else{
            $("#limitShip").text('不是限制发货')
        }

    },2 * 1000 );

    jQuery.Huitab =function(tabBar,tabCon,class_name,tabEvent,i){
        var $tab_menu=$(tabBar);
        // 初始化操作
        $tab_menu.removeClass(class_name);
        $(tabBar).eq(i).addClass(class_name);
        $(tabCon).hide();
        $(tabCon).eq(i).show();

        $tab_menu.bind(tabEvent,function(){
            $tab_menu.removeClass(class_name);
            $(this).addClass(class_name);
            var index=$tab_menu.index(this);
            $(tabCon).hide();
            $(tabCon).eq(index).show()
            if (!$(".tabBar span:eq(0)").hasClass("current")){
                $("#modal-company").hide()
            }
        })}
    $(function(){
        $.Huitab("#tab_demo .tabBar span","#tab_demo .tabCon","current","click","0")});


    $(function(){

        //获取当前操作人
        var quzhi=JSON.parse(web.readCookie("loginData"));
        var nowUser = quzhi.user.name;
        $("input[name='createUser']").val(nowUser);
        //获取customerCode
        var customerCode = getQueryString('id');
        $("input[name='belongCustomerCode']").val(customerCode);
        //获取customdeId
        var customerId = getQueryString('customerId');
        $("input[name='belongCustomerId']").val(customerId);

       /* findAccountByCustomerCode();*/


    });


    //添加账户
    $("#addAccount").click(function () {
        //防止表单重复提交
        /*$("#addAccount").attr("disabled",true);*/
        var loginAccont = $("input[name='loginAccount']").val();
        var customerdatas = sessionStorage.getItem("customerdatas");
        var customerid = sessionStorage.getItem("customerid");
        var customertype = sessionStorage.getItem("customertype");
        if (null != loginAccont && "" != loginAccont) {
            $.ajax({
                /*root.inter.isToCreateAccounts*/
                url:root.inter.isToCreateAccounts,
                cache: false,  //禁用缓存
                type: "POST",
                dataType:'json',
                async:false,
                data: {
                    customerId:customerid,
                    customerCode:customerdatas,
                    customerType:customertype
                },
                success: function (data) {
                    if(data.sub_code==0){
                        $('#zomg-add').ajaxSubmit({
                            url:'https://'+ window.location.host +'/api/admin/acontract/account/addCustomerAccount.jhtml',
                            type:"post",  //提交方式
                            success:function (data) {
                                if (data.errorCode == 0){
                                    layer.msg('添加成功!', {icon: 6,time:1000});
                                    $("#addAccount").attr("disabled",false);
                                    //清空账号
                                    $("input[name='loginAccount']").val("");
                                    $("input[name='enable_order']").attr("checked",false);
                                    $("input[name='enable_order']").val(20);
                                    $("input[name='enable_audit']").attr("checked",false);
                                    $("input[name='enable_audit']").val(20);
                                    $("input[name='enable_settle']").attr("checked",false);
                                    $("input[name='enable_settle']").val(20);
                                    //清空下拉框
                                    $("#fen_lsit").html("");
                                    $("#shen_list").html("");
                                    $("#zong_lsit").html("");
                                    /*findAccountByCustomerCode();*/
                                    zfsdata()
                                }else{
                                    layer.msg("添加失败！原因("+data.errorMessage+")", {icon:5,time:2000});
                                    $("#addAccount").attr("disabled",false);
                                }
                            }
                        })

                    }else {
                        $.Huimodalalert(data.sub_msg,2000);

                    }

                },
            });

        }else {
            layer.msg('账号不能为空!', {icon: 5,time:2000});
            $("#addAccount").attr("disabled",false);
        }


    })


    function findAccountByCustomerCode1() {
        //获取customerCode
        var customerCode = getQueryString('id');
        //查询该客户的所有账号信息
        $.post('https://'+ window.location.host +'/api/admin/amembership/findAccountByCustomerCode.jhtml',{customerCode:customerCode},function (data) {

            //下单账号
            var account = data.account;
            if (null != account) {
                $("#fen_lsit").append("<option selected disabled='disabled'>请输入下单账号</option>");
                //循环填充所有的下单账号
                $.each(account,function(idx, obj) {
                    $("#fen_lsit").append("<option value='"+obj.login_account+"'>"+obj.login_account+"</option> ")
                    $("#fen_lsit").append("<input type='hidden' id='sub"+obj.login_account+"' value='"+obj.member_id+"' name='memberId'> ")
                });
            }else{
                $("#fen_lsit").append("<option>没有数据</option>")
            }

            //审批账号
            if (null != account) {
                $("#shen_list").append("<option selected disabled='disabled'>请输入审批账号</option>");
                //循环填充所有的下单账号
                $.each(account,function(idx, obj) {
                    $("#shen_list").append("<option value='"+obj.login_account+"'>"+obj.login_account+"</option> ")
                    $("#shen_list").append("<input type='hidden' id='audit"+obj.login_account+"' value='"+obj.member_id+"' name='memberId'> ")
                });
            }else{
                $("#shen_list").append("<option>没有数据</option>")
            }

            //结算账号
            if (null != account) {
                $("#zong_lsit").append("<option selected disabled='disabled'>请输入结算账号</option>");
                //循环填充所有的下单账号
                $.each(account,function(idx, obj) {
                    $("#zong_lsit").append("<option value='"+obj.login_account+"'>"+obj.login_account+"</option>")
                    $("#zong_lsit").append("<input type='hidden' id='total"+obj.login_account+"' value='"+obj.member_id+"' name='memberId'> ")
                });
            }else{
                $("#zong_lsit").append("<option>没有数据</option>")
            }
        })
    }
    //formdata上传图片公用方法
    //触发事件
    var ipcuu=""
    function addBtn(cen,ir) {
        ipcuu=ir
        $(cen).prev().trigger('click');
    }
    var formData = new FormData();
    // 提交上传图片
    function getupfilerul(can,e){
        console.log(can)
        console.log(e)
        console.log($("#fileUp1").val)
        var formData = new FormData();
        formData.append('file',$(can)[0].files[0]);
        // formData.append('file',$("#fileUp").files);
        console.log($(can)[0].files[0])
        console.log(formData)
        $.ajax({
            url: root.inter.imgUpload,
            cache: false,  //禁用缓存
            type: "POST",
            // 告诉jQuery不要去处理发送的数据
            processData : false,
            // 告诉jQuery不要去设置Content-Type请求头
            contentType : false,
            data: formData,
            success: function (data) {
                for(var i=0; i<data.length; i++){
                    $(can).prev().val(data[0].reletivePath)
                    $(can).prev().text(data[0].reletivePath)
                }
                var customerdatas = sessionStorage.getItem("customerdatas");
                console.log(ipcuu)
                var picii=""
                var picii1=""
                var picii2=""
                var picii3=""
                if(ipcuu==1){
                    for(var i=0; i<data.length; i++){
                        picii=data[0].fullPath
                    }
                }else {
                    picii=""
                }
                if(ipcuu==2){
                    for(var i=0; i<data.length; i++){
                        picii1=data[0].fullPath
                    }
                }else {
                    picii1=""
                }
                if(ipcuu==3){
                    for(var i=0; i<data.length; i++){
                        picii2=data[0].fullPath
                    }
                }else {
                    picii2=""
                }
                if(ipcuu==4){
                    for(var i=0; i<data.length; i++){
                        picii3=data[0].fullPath
                    }
                }else {
                    picii3=""
                }
                $.ajax({
                    /*root.inter.updateCustomerInfoByCode*/
                    url:root.inter.updateCustomerInfoByCode,
                    cache: false,  //禁用缓存
                    type: "POST",
                    dataType:'json',
                    async:false,
                    data: {
                        customerCode:customerdatas,
                        operateManagerId:"",
                        operateManagerName:"",
                        groupBusinessLicenseAddr:picii,//企业营业执照
                        groupOpeningAccountAddr:picii1,//企业开户许可证:
                        groupIDcardUrl:picii2,//身份证图片
                        groupLoa:picii3,//委托书权书
                        purchGoodIntroduct:"",
                        email:""
                    },
                    success: function (data) {
                    },
                    error: function () {
                        $.Huimodalalert('失败！',2000);
                    }
                })
            }
        })
    }
    // 上传图片返现
    function putDataToPage(e,can) {
        console.log($("#intro").val())
        for(var i = 0; i < e.target.files.length; i++) {
            var file = e.target.files.item(i);
            if(!(/^image\/.*$/i.test(file.type))) {
                continue; //不是图片 就跳出这一次循环
            }
            //实例化FileReader API
            var freader = new FileReader();
            freader.readAsDataURL(file);
            console.log(e.path)
            console.log(can)
            freader.onload = function (e) {
                console.log(can)
                $(can).parent().prev().children().attr("src", e.target.result);
                console.log(e)
                $(can).next().text('更新')
                getupfilerul(can,e)
            }
        }
        formData.append('file', $(can)[0].files[0]);
    }
    // 企业logo
    /* jcrop对象，全局变量方便操作 */
    var api = null;
    /* 原图宽度 */
    var boundx;
    /* 原图高度 */
    var boundy;
    /* 选择图片事件 */
    function readURL(URL){
        var reader = new FileReader();
        reader.readAsDataURL(URL.files[0]);
        reader.onload = function(e){
            $("#faceId").removeAttr("src");
            $("#lookId").removeAttr("src");
            $("#faceId").attr("src",e.target.result);
            $("#lookId").attr("src",e.target.result);
            $("#faceId").Jcrop({
                setSelect: [ 20, 20, 200, 200 ],
                onChange: showPreview,
                onSelect: showPreview,
                aspectRatio: 1,
                boxWidth:600
            },function(){
                // Use the API to get the real image size
                //使用API来获得真实的图像大小
                var bounds = this.getBounds();
                boundx = bounds[0];
                boundy = bounds[1];
                // Store the API in the jcrop_api variable
                //jcrop_api变量中存储API
                api = this;

                $("#boundx").val(boundx);
                $("#boundy").val(boundy);

            });
        };
        /* 移除jcrop */
        if (api != undefined) {
            api.destroy();
        }

        //简单的事件处理程序，响应自onChange,onSelect事件，按照上面的Jcrop调用
        function showPreview(coords){
            /* 设置剪切参数 */
            $("#x").val(coords.x);
            $("#y").val(coords.y);
            $("#w").val(coords.w);
            $("#h").val(coords.h);
            if(parseInt(coords.w) > 0){
                //计算预览区域图片缩放的比例，通过计算显示区域的宽度(与高度)与剪裁的宽度(与高度)之比得到
                var rx = $("#preview_box").width() / coords.w;
                var ry = $("#preview_box").height() / coords.h;
                $("#lookId").css({
                    width:Math.round(rx * $("#faceId").width()) + "px",    //预览图片宽度为计算比例值与原图片宽度的乘积
                    height:Math.round(rx * $("#faceId").height()) + "px",  //预览图片高度为计算比例值与原图片高度的乘积
                    marginLeft:"-" + Math.round(rx * coords.x) + "px",
                    marginTop:"-" + Math.round(ry * coords.y) + "px"
                });
            }
        }
    }
    $('#save').click(function(){
        $('#uploadImgForm').ajaxSubmit({
            url:root.inter.imgUpload,
            type:"post",  //提交方式
            success:function (data) {

                $('#modal-company').hide()
                $('#fileUp5url').attr("src", data[0].fullPath);
                $('#fileUp5').val(data[0].fullPath)
                $('#logoingmer').text('更新')
                api.destroy();
                $("#faceId").hide()
                $("#lookId").hide()
                if (data[0].errorCode == 0) {
                    layer.msg('上传成功!', {icon: 6,time:1000});
                    var customerdatas = sessionStorage.getItem("customerdatas");
                    $.ajax({
                        /*root.inter.updateCustomerInfoByCode*/
                        url:root.inter.updateCustomerInfoByCode,
                        cache: false,  //禁用缓存
                        type: "POST",
                        dataType:'json',
                        async:false,
                        data: {
                            customerCode:customerdatas,
                            operateManagerId:"",
                            operateManagerName:"",
                            groupBusinessLicenseAddr:"",//企业营业执照
                            groupOpeningAccountAddr:"",//企业开户许可证:
                            groupIDcardUrl:"",//身份证图片
                            groupLoa:"",//委托书权书
                            purchGoodIntroduct:"",
                            email:"",
                            logo:data[0].fullPath
                        },
                        success: function (data) {
                        },
                        error: function () {
                            $.Huimodalalert('失败！',2000);
                        }
                    })
                }else {
                    layer.msg('上传失败!', {icon: 5,time:1000});
                }

            }
        })
    })
    // 显示隐藏企业logo弹框
    function logodata(data) {
        $("#faceId").removeAttr("src");
        $("#lookId").attr("src","../../img/adminImg.png");
        $("#lookId").removeAttr("style");
        $("input[name='file']").val("");
        // var container = $('#form-member-add');
        document.documentElement.scrollTop = 0;
        // $(container).scrollTop(0);
        if(data==1){
            $('#modal-company').show()
            return false
        }else{
            $('#modal-company').hide()
            api.destroy();
            $("#faceId").hide()
            $("#lookId").hide()
        }
    }

//全选
$("#deliveryWay-all").click(function () {
    var all_check = $("#deliveryWay-all").is(":checked");
    var customerpoolid_checks = $("input[name='deliveryWay']");
    for (var i = 0; i < customerpoolid_checks.length; i++) {
        customerpoolid_checks[i].checked = all_check;
    }
});

//
$("input[name='deliveryWay']").click(function () {
    var all_check_num = $("input[name='deliveryWay']:checked").length;
    var deliveryWay_num = $("input[name='deliveryWay']").length;
    $("#deliveryWay-all").prop("checked",all_check_num == deliveryWay_num);
});



</script>
</body>
</html>
